package com.foreknow.demo12;

/**
 * 对字符串的操作
 */
public class StringDemo {
    public static void main(String[] args) {
        String name = "      fender     ";
        System.out.println(name.trim());
        System.out.println(name.length());
        String new_str = name.concat(" good").concat(" gibson");
        System.out.println(new_str);
        System.out.println("hamburger".substring(4, 8));

        String content = "aa bb cc";
        String[] str = content.split(" ");
        for(int i = 0;i<str.length;i++) {
            System.out.println(str[i]);
        }
    }
}
